package com.itheima.pojo;
import cn.afterturn.easypoi.excel.annotation.Excel;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import java.util.Date;
import java.util.List;

/**
 * 员工
 */
@Data
@TableName("tb_user")
public class User {
    @TableId(type = IdType.AUTO)
    @Excel(name = "编号",orderNum = "0",width = 5)
    private Long id;         //主键
    @Excel(name = "姓名",orderNum = "1",width = 10,isImportField = "true")
    private String userName; //员工名
    @Excel(name = "手机",orderNum = "2",width = 10,isImportField = "true")
    private String phone;    //手机号
    @Excel(name = "省份",orderNum = "3",width = 10,isImportField = "true")
    private String province; //省份名
    @Excel(name = "城市",orderNum = "4",width = 10,isImportField = "true")
    private String city;     //城市名
    @Excel(name = "工资",orderNum = "5",width = 10,isImportField = "true")
    private Integer salary;   // 工资
    @JsonFormat(pattern="yyyy-MM-dd")
    @Excel(name = "入职日期",orderNum = "6",format = "yyyy-MM-dd",width = 10,isImportField = "true")
    private Date hireDate; // 入职日期
    private String deptId;   //部门id
    @Excel(name = "出生日期",orderNum = "7",format = "yyyy-MM-dd",width = 10,isImportField = "true")
    private Date birthday; //出生日期
    @Excel(name = "照片",orderNum = "9",type = 2,width = 10,isImportField = "true",savePath = "E:\\IDEA_Code\\report_export\\src\\main\\resources\\static\\user_photos\\")
    private String photo;    //一寸照片
    @Excel(name = "现住址",orderNum = "8",width = 20,isImportField = "true")
    private String address;  //现在居住地址

    @TableField(exist = false)
    private List<Resource> resourceList; //办公用品

}
